class TestException{
    public static void main(String[] args) {
        try{
            int[] arr = new int[5];
            arr[5] = 11;
        }
        catch (ArrayIndexOutOfBoundsException e){
            System.out.println("ArrayIndexOutOfBoundsException caught");
        }
        catch (IllegalArgumentException e){
            System.out.println("IllegalArgumentException caught");
        }
        finally {
            System.out.println("Finally block");
        }
    }
}